<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>JBookStore</title>
	<%@ include file="/WEB-INF/jsp/include/common.jsp"%>
	<script src="javaScript/main.js" charset='utf-8'></script>
</head>

<body>
	<table width="100%" border=1>
		<!-- 카테고리 영역 -->
		<tr>
			<td align="center" width=300>
				<%@ include file="/WEB-INF/jsp/include/logo.jsp"%>
			</td>
			<td align="center" bgcolor="#F5F5F5">
				<%@ include file="/WEB-INF/jsp/include/category_menu.jsp"%>
			</td>
		</tr>
		<tr>
			<!-- 메뉴 영역 -->
			<td valign="top" width=300>
				<%@ include file="/WEB-INF/jsp/include/left_menu.jsp"%>
			</td>
			<!-- 북리스트 영역 -->
			<td>
				<form id="bookForm">
					<table>
						<tr>
							<th>
								<input type="checkbox" id="all_select" onClick="allCheck(this)" />
							</th>
							<th>이미지</th>
							<th>도서명</th>
							<th>출판사</th>
							<th>작가</th>
							<th>가격</th>
							<th></th>
						</tr>
						<c:forEach items="${bookList}" var="book" varStatus="loop">
							<tr align='center'>
								<!-- 체크박스 -->
								<td width=10%>
									<input type="checkbox" name="selectBook" value="${book.bookId}">
								</td>
								<!-- 이미지 -->
								<td width=20%>
									<img src="${book.img}" />
								</td>
								<!-- 도서명 -->
								<td width=30%>
									<a href="<c:url value='/bookDetail.do?bookId=${book.bookId}'/>">
										${book.title}
									</a>
								</td>
								<!-- 출판사 -->
								<td width=10%>
									${book.publisher}
								</td>
								<!-- 작가 -->
								<td width=10%>
									${book.author}
								</td>
								<!-- 가격 -->
								<td width=10%>
									${book.price}
								</td>
								<!-- 버튼영역 -->
								<td width=10%>
									<input type="button" onclick="orderBook('${book.bookId}');" value="주문하기" />
									<input type="button" onclick="addCart('${book.bookId}');" value="장바구니 담기" />
								</td>
							</tr>
						</c:forEach>
						<tr>
							<td colspan="7" height="30"></td>
						</tr>
						<tr>
							<td colspan="7">
								<table width="100%">
									<tr>
										<td align="right">
											<input type="hidden" name="selectedBookIds" id="selectedBookIds" />
											<input type="button" onclick="orderBook()" value="선택한 도서 주문" />
											<input type="button" onclick="alert('장바구니 담기 개발중 입니다.')" value="선택한 도서 장바구니 담기" />
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</form>
			</td>
		</tr>
	</table>
</body>

</html>